import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/main/taskchoose'
  },
  {
    path: '/marking',
    component: () => import('../views/marking/marking')
  },
  {
    path: '/main',
    name: 'Main',
    component: () => import('../views/Main'),
    children: [
      {
        path: 'taskchoose',
        name: '/main/taskchoose',
        component: () => import('../components/taskchoose')
      },
      {
        path: 'tasklist',
        name: '/main/tasklist',
        component: () => import('../components/tasklist')
      },
      {
        path: 'imagechoose',
        name: '/main/imagechoose',
        component: () => import('../components/imagechoose')
      }
    ]
  }
  // {
  //   path: '/smoking',
  //   component: () => import('../components/smoking')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
